#ifndef _NET_H_
#define _NET_H_

#define DEBUGMODE 1
#define SOCK_BUF_LEN 1
#include <winsock2.h>
#include <iostream>

#pragma comment (lib, "Ws2_32.lib")

class Sock
{
protected:
	SOCKET connSock;
	int Init();
	void CloseSock(SOCKET so);
private:
	char * _ReceiveData();
public:	
	char * ReceiveData();
	char * ReceiveData(int n);
	int SendData(char* data);
};

class ServerSocket:public Sock
{
private:
	SOCKET ListenSock;

public:
	ServerSocket(int port);
	~ServerSocket();

//private:
//	int Bind();
//	int Listen();
//	void Accept();
};

class ClientSocket:public Sock
{
public:
	ClientSocket(const char* ip, int port);
	//int Connect();
	~ClientSocket();
};

#endif